<template>
  <el-affix offset="0">
    <el-menu
        :default-active="activeIndex"
        class="el-menu-demo"
        mode="horizontal"
        @select="handleSelect"
    >
      <el-menu-item index="1"><router-link to="/daka" style="text-decoration: none">自动打卡助手</router-link></el-menu-item>

      <el-sub-menu index="2">
        <template #title>其他</template>
        <el-sub-menu index="2-4">
          <template #title>捐赠</template>
          <router-link to="/zfb" style="text-decoration: none"><el-menu-item index="2-4-2">支付宝</el-menu-item></router-link>
          <router-link to="/wx" style="text-decoration: none"><el-menu-item index="2-4-2">微信</el-menu-item></router-link>
        </el-sub-menu>
      </el-sub-menu>
    </el-menu>
  </el-affix>
  <router-view/>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
const activeIndex = ref('1')
const activeIndex2 = ref('1')
const handleSelect = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
</script>